﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplicationRating
{
    public partial class PopularByCategory : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected string ThumbDisplayOne(decimal AvgRating)
        {
            return (AvgRating < 2) ? "starhot1.gif" : "";
            // return (AvgRating <= 2) ? "star1.png" : "star5.png"

        }

        protected string ThumbDisplayTwo(decimal AvgRating)
        {
            return (AvgRating < 3) && (AvgRating >= 2) ? "starhot2.gif" : "";
            // return (AvgRating <= 2) ? "star1.png" : "star5.png"

        }

        protected string ThumbDisplayThree(decimal AvgRating)
        {
            return (AvgRating < 4) && (AvgRating >= 3) ? "starhot3.gif" : "";
            // return (AvgRating <= 2) ? "star1.png" : "star5.png"

        }

        protected string ThumbDisplayFour(decimal AvgRating)
        {
            return (AvgRating < 5) && (AvgRating >= 4) ? "starhot4.gif" : "";
            // return (AvgRating <= 2) ? "star1.png" : "star5.png"

        }

        protected string ThumbDisplayFive(decimal AvgRating)
        {
            return (AvgRating == 5) ? "starhot5.gif" : "";
            // return (AvgRating <= 2) ? "star1.png" : "star5.png"

        }

    }
}